Configuration panel fixes

jamesperet 9 years ago
parent
commit
e6d55942f6

+ 6 - 8
app/controllers/application_controller.rb

@@ -11,13 +11,11 @@ class ApplicationController < ActionController::Base
11 11
     devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:first_name, :last_name, :email, :current_password, :avatar) }
12 12
     devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:first_name, :last_name, :email, :password) }
13 13
   end
14
-  
15
-  private
16
-  
17
-    def config_site  
18
-      @config = Info.first
19
-      #I18n.config.enforce_available_locales = false
20
-      I18n.default_locale = @config.default_language
21
-    end
14
+    
15
+  def config_site  
16
+    @config = Info.first
17
+    #I18n.config.enforce_available_locales = false
18
+    I18n.default_locale = @config.default_language
19
+  end
22 20
   
23 21
 end

+ 1 - 0
app/helpers/application_helper.rb

@@ -1,2 +1,3 @@
1 1
 module ApplicationHelper
2
+
2 3
 end

+ 2 - 1
app/views/admin_panel/site_config.html.erb

@@ -12,7 +12,8 @@
12 12
 			  <div class="form-inputs">
13 13
 			    <%= f.input :website_name, :label => (t 'admin_panel.website_name'), :input_html => {:class => 'input-large'} %>
14 14
 			    <%= f.input :tagline, :label => (t 'admin_panel.tagline'), :input_html => { :class => 'input-xxlarge'} %>
15
-			    <%= f.input :default_language, collection: ["en", "pt-BR"], prompt:"Select default language",  :label => (t 'admin_panel.default_language'), hint: (t "admin_panel.language_hint") %>
15
+			    <%= f.input :default_language, collection: ["en", "pt-BR"], prompt:"Select default language",  :label => (t 'admin_panel.default_language'), hint: ("<i>* "+(t "admin_panel.language_hint")+"</i>").html_safe %>
16
+			    <%= f.input :contact_email, :label => (t 'admin_panel.contact_email'), :input_html => {:class => 'input-large'} %>
16 17
 
17 18
 			  </div>
18 19
 

+ 1 - 1
app/views/layouts/_footer.html.erb

@@ -1,4 +1,4 @@
1 1
 <footer>
2 2
   <hr>
3
-  <p style="text-align: center;">&copy; Company 2014</p>
3
+  <p style="text-align: center;">&copy; <%= @config.website_name %> <%= Time.now.year %></p>
4 4
 </footer>

+ 0 - 5
app/views/start/index.html.erb

@@ -1,9 +1,4 @@
1 1
 <div class="hero-unit">
2 2
   <h1><%= @config.website_name %></h1>
3 3
   <p><%= @config.tagline %></p>
4
-  <p>
5
-    <a class="btn btn-primary btn-large">
6
-      Learn more
7
-    </a>
8
-  </p>
9 4
 </div>

+ 2 - 0
config/locales/en.yml

@@ -218,6 +218,8 @@ en:
218 218
     tagline: Tagline
219 219
     default_language: Default Language
220 220
     update_config_btn: Update Config
221
+    contact_email: Contact Email
222
+    config_update_success: Configurations saved successfully
221 223
   nav:
222 224
     admin_panel: Admin Panel
223 225
     account: Account

+ 1 - 0
config/locales/pt-BR.yml

@@ -221,6 +221,7 @@ pt-BR:
221 221
     tagline: Tagline
222 222
     default_language: Lingua padrão
223 223
     update_config_btn: Salvar Configurações
224
+    contact_email: Email de contato
224 225
   nav:
225 226
     admin_panel: Painel de Controle
226 227
     account: Conta

+ 2 - 8
readme.md

@@ -12,7 +12,8 @@ A template for creating rails websites that includes the following:
12 12
 
13 13
 Other features are still under development:
14 14
 
15
-* Email System (PaperClip + MailChimp)
15
+* Contact System
16
+* Email System (PaperClip + MailChimp + Mandrill)
16 17
 * Search System
17 18
 * Wiki/Codex
18 19
 - Portfolio
@@ -24,7 +25,6 @@ Other features are still under development:
24 25
 ## Todo's
25 26
 
26 27
 * Authentication layout
27
-* post thumbnails
28 28
 * post form layout
29 29
 * edit account layout
30 30
 * make admin button
@@ -41,12 +41,6 @@ Other features are still under development:
41 41
 
42 42
 ## Configurations
43 43
 
44
-* Website Name
45
-* Tagline
46
-* Logo
47
-* Contact Email
48
-* Default Language
49
-
50 44
 * Maintaince Mode (Boolean)
51 45
 * Maintance Mode Message
52 46